import React, { useEffect, useState } from 'react'
import * as api from './server'
const Collect = () => {
    const [list,setList]=useState([]);
    useEffect(() => {
    api.getCollect('HL1115')
      .then(res => {
        console.log(res)
        setList(res.data)
      })
    },[])
    return (
        <div>
            {
                list.map(item=>{
                    return <li key={item.id}>{item.title}</li>
                })
            }
        </div>
    )
}

export default Collect